package com.example.micro.common.demo;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class LambdaDemo {

    public static void main(String[] args) {

        int i = 0;
        List<String> list = new ArrayList<>();
        int finalI = i;
        list = list.stream()
                .map(x -> {
                    return x + finalI;
                })
                .collect(Collectors.toList());
        i = 1;

    }

}

